package com.atguigu.spring6.iocxml.resource.controller;

import com.atguigu.spring6.iocxml.resource.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Controller;

@Controller
public class UserController {
//    根据名称进行注入
    @Resource(name = "myUserService")
    private UserService userService;

    public void addUser(){
        System.out.println("controller");
        userService.addUser();
    }

}